import { ref, onMounted } from "vue"
export default function usecounter() {
    const counter = ref(0)
    function up() {
        counter.value++
    }
    function down() {
        counter.value--
    }
    onMounted(() => {
        setTimeout(() => {
            counter.value=999
        },1000)
    })
    return {
        counter,
        up,
        down,
        onMounted
    }
}